import request from "@/utils/request"

export default {
  // 订单列表
  getList(data) {
    return request({
      url: `/order/list`,
      method: "post",
      data,
    })
  },

  // 批量取消订单
  batchCancel(data) {
    return request({
      url: `/order/batch/cancel`,
      method: "post",
      data,
    })
  },

  // 订单批量初始化
  batchInit(data) {
    return request({
      url: `/order/batch/init`,
      method: "post",
      data,
    })
  },

  // 批量替换 sku
  batchReplaceSku(data) {
    return request({
      url: `/order/batch/replaceSku`,
      method: "post",
      data,
    })
  },

  // 批量拆分订单
  batchSplitOrder(data) {
    return request({
      url: `/order/batch/split`,
      method: "post",
      data,
    })
  },
  // 订单批量修改备注
  batchRemarkOrder(data) {
    return request({
      url: `/order/batch/updateOrderRemark`,
      method: "post",
      data,
    })
  },

  // 订单关联Sku
  associateSku(data) {
    return request({
      url: `/order/associateSku`,
      method: "post",
      data,
    })
  },

  // http://10.20.9.32:40001/project/57/interface/api/9260
  batchOperation(data) {
    return request({
      url: `/order/batch/operation`,
      method: "post",
      data,
    })
  },

  //   http://10.20.9.32:40001/project/57/interface/api/13980
  getImportTpl(params) {
    return request({
      url: `/import/tpl`,
      method: "get",
      params,
    })
  },

  // 保存查询参数
  queryParamsCreate(data) {
    return request({
      url: `/query/params/create`,
      method: "post",
      data,
    })
  },
  // 获取查询参数
  queryParamsIndex(params) {
    return request({
      url: `/query/params/index`,
      method: "get",
      params,
    })
  },
  // 删除查询参数
  queryParamsDelete(data) {
    return request({
      url: `/query/params/delete?${data}`,
      method: "post",
      // params:JSON.stringify(data)
      // data:JSON.stringify(data),
    })
  },

  // 订单发票
  orderInvoice(params) {
    return request({
      url: `/order/invoice`,
      method: "get",
      params,
    })
  },

  // 可合并订单列表
  canMergedIndex(data) {
    return request({
      url: `/order/canMerged/index`,
      method: "post",
      data,
    })
  },
  // 合并
  canMergedMerge(data) {
    return request({
      url: `/order/canMerged/merge`,
      method: "post",
      data,
    })
  },
  // 不合并
  canMergedNoMerge(data) {
    return request({
      url: `/order/canMerged/notMerged`,
      method: "post",
      data,
    })
  },
  // 订单已合并列表
  mergedIndex(data) {
    return request({
      url: `/order/merged/index`,
      method: "post",
      data,
    })
  },
  // 取消合并
  mergedCancel(data) {
    return request({
      url: `/order/merged/cancel`,
      method: "post",
      data,
    })
  },

  // 导入文件
  batchImport(data) {
    return request({
      url: `/order/batch/import`,
      method: "post",
      data,
    })
  },

  // 上传出库单号
  uploadOutNumber(data) {
    return request({
      url: `/upload/out-number`,
      method: "post",
      data,
    })
  },
  //  获取上传列表
  getOutNumber(params) {
    return request({
      url: `/upload/out-number`,
      method: "get",
      params,
    })
  },
  // 修改订单地址
  orderUpdateRecipient(data) {
    return request({
      url: `/order/updateRecipient`,
      method: "post",
      data,
    })
  },

  //
  orderUpdateRecipient(data) {
    return request({
      url: `/order/updateRecipient`,
      method: "post",
      data,
    })
  },
  // http://10.20.9.32:40001/project/57/interface/api/21423    批量ebay订单取消
  batchEbayCancel(data) {
    return request({
      url: `/order/batch/ebayCancel`,
      method: "post",
      data,
    })
  },
  // http://10.20.9.32:40001/project/57/interface/api/21597
  //  获取批处理操作结果
  batchResults(params) {
    return request({
      url: `/order/batch/results`,
      method: "get",
      params,
    })
  },
  //  批量标记物流退回
  shippedReturnBatchRemark(data) {
    return request({
      url: `/order/shippedReturn/batchRemark`,
      method: "post",
      data,
    })
  },

  //  批量上传追踪号 上传
  uploadTraceNumber(data) {
    return request({
      url: `/order/batch/uploadTraceNumber`,
      method: "post",
      data,
    })
  },
  //  获取 批量手动上传追踪号 历史记录
  uploadTraceNumberHistory(params) {
    return request({
      url: `/order/uploadTraceNumber/history`,
      method: "get",
      params,
    })
  },

  //  编辑订单附件
  attachment(data) {
    return request({
      url: `/order/attachment`,
      method: "post",
      data,
    })
  },
}
